package com.aizuda.boot.modules.business.contractNumber.domain.entity;

import com.aizuda.boot.modules.common.constant.enums.*;
import com.aizuda.core.bean.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author sangyirong
 * @ClassName ContractNumberRuleEntity
 * @Version 1.0
 * @Date 2025/6/27 18:18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "合同编号规则")
@TableName("contract_number_rule")
public class ContractNumberRuleEntity extends BaseEntity {

    @Schema(description = "规则名称")
    private String ruleName;

    @Schema(description = "规则编码")
    private String ruleCode;

    @Schema(description = "规则类型")
    private RuleTypeEnums ruleType;

    @Schema(description = "生成时机")
    private GenerateTimingEnums generateTiming;

    @Schema(description = "自动序号位数")
    private Integer autoIncrementDigits;

    @Schema(description = "当前序号")
    private Integer currentSequence;

    @Schema(description = "是否启用")
    private Boolean isEnabled;

    @Schema(description = "编号模式：所有合同共用一套编号或基于我方主体生成编号")
    private NumberModeEnums numberMode;

    @Schema(description = "序号重置时长：不重置、每月重置、每年重置")
    private SequenceResetEnums sequenceReset;

    @Schema(description = "我方主体添加模式：只有第一个地方添加或所有地方都添加")
    private SubjectAddModeEnums subjectAddMode;

    @Schema(description = "序号重置时间")
    private Date resetTime;

    @Schema(description = "编码条件")
    private CodingConditionEnums codingCondition;
}
